package sw.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import sw.entity.Weakness;

public interface WeaknessDao extends CrudRepository<Weakness, Integer> {

	@Query(value="select model from Weakness model where model.thread.asset.project.id =?1")
	public List<Weakness> findByProjectId(Integer projectId);
	
	
	@Query(value="select model from Weakness model where model.thread.asset.id =?1")
	public List<Weakness> findByAssetId(Integer projectId);
}
